package yifeng.serializable;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class UnSerializabler {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Object obj = null;
		try {
			FileInputStream inStream = new FileInputStream("d:/ttt.data");
			ObjectInputStream objIn = new ObjectInputStream(inStream);
			obj = objIn.readObject();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		
		System.out.println(obj.getClass());
		
		System.out.println(((Manager)obj).getName());
		
		System.out.println(Manager.getInstance().getName());
		
		
		
		
		
		
		
		
	}

}
